﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Titan.Test
{


    public class PersonProp
    {

        private static PropertyExpression personId = new PropertyExpression("PersonId");
        public static PropertyExpression PersonId
        {
            get
            {
                return personId;
            }
        }
    }

    [TestClass]
    public class ExpressionTest
    {
        [TestMethod]
        public void Test()
        {
            QueryExpression q = new QueryExpression();
            q.Select(PersonProp.PersonId)
             .Select(PropertyExpression.Count)
             .Select(PersonProp.PersonId.Max)
             .Where(PersonProp.PersonId == 5 & PersonProp.PersonId == 6)
             .GroupBy(PersonProp.PersonId)
             .Having(PropertyExpression.Count == 5)
             .OrderBy(PersonProp.PersonId.Asc)
             ;
        }
    }
}
